package com.example.controller;

import com.example.entity.User;
import com.example.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangwenlong@dhcc.com.cn
 * @description:
 * @date 2023/12/15 16:57
 */
@RestController
@Api(tags = "用户相关接口")
public class UserController {
    @Autowired
    private UserService userService;

    @ApiOperation("查找所有用户")
    @GetMapping("/findAll")
    public List<User> findAll(){
        return userService.findAll();
    }
}
